<%inherit file="/base.html"/>

<%def name="extra_css()">
	<link rel="stylesheet" type="text/css" href="${url('/css/pubservices.css')}"/>
</%def>

<%def name="extra_js()">
	<script type="text/javascript" src="${url('/js/pubservices.editing.js')}"></script>
</%def>

<%def name="main_heading()">${c.district}</%def>

<%def name="toolbar()">
	${h.select_district(c.district.id)}
	${h.select_service(c.service)}
</%def>

<%def name="content()">
	<div class="charges-editing">
		${h.years_chooser(c.years, c.year)}
		<table class="data-table">
			<thead>
				<tr><%include file="table_header.html"/></tr>
			</thead>
			<tbody>
				<tr class="add-form-row"><%include file="table_add_row.html"/></tr>
				% for c.record in c.records:
					% if c.record.decade == 0:
					<tr class="month-row data-row">
					% else:
					<tr class="decade-row data-row">
					% endif
						<%include file="table_row.html"/>
					</tr>
				% endfor
			</tbody>
		</table>
		<form class="save-form" action="${url.current(action='save')}" style="display:none;">
			<table class="save-form-table">
			</table>
		</form>
		<form class="add-form" action="${url.current(action='add', year=c.year)}" style="display:none;">
			<table class="add-form-table">
			</table>
		</form>
	</div>
</%def>